using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._CartographyTools._Annotation
{
    /// <summary>
    /// <para>Map Server Cache Tiling Scheme To Polygons</para>
    /// <para>Creates a new polygon feature class from an existing tiling scheme.</para>
    /// <para>根据现有切片方案创建新的面要素类。</para>
    /// </summary>    
    [DisplayName("Map Server Cache Tiling Scheme To Polygons")]
    public class MapServerCacheTilingSchemeToPolygons : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public MapServerCacheTilingSchemeToPolygons()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_input_map">
        /// <para>Input Map</para>
        /// <para>The current map to be used.</para>
        /// <para>要使用的当前地图。</para>
        /// </param>
        /// <param name="_tiling_scheme">
        /// <para>Tiling Scheme</para>
        /// <para>A predefined tiling scheme .xml file.</para>
        /// <para>文件.xml预定义切片方案。</para>
        /// </param>
        /// <param name="_output_feature_class">
        /// <para>Output Feature Class</para>
        /// <para>The output polygon feature class.</para>
        /// <para>输出面要素类。</para>
        /// </param>
        /// <param name="_use_map_extent">
        /// <para>Generate polygons that intersect the map extent</para>
        /// <para><xdoc>
        ///   <para>Specifies whether polygon features will be created for the entire extent of the tiling scheme or only those tiles that intersect the full extent of the map.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—Polygon features will be created for the full extent of the map. This is the default.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Polygon features will be created for the full extent of the tiling scheme.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是为切片方案的整个范围创建面要素，还是仅为与地图全图范围相交的切片创建面要素。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 将针对地图的全图创建面要素。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>未选中 - 将针对切片方案的全图范围创建面要素。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        /// <param name="_clip_to_horizon">
        /// <para>Clip tiles at the coordinate system horizon</para>
        /// <para><xdoc>
        ///   <para>Specifies whether polygons will be constrained to the valid area of use for the geographic or projected coordinate system of the map.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—Polygon features will only be created within the valid area of use for the geographic or projected coordinate system of the map. Tiles that are within the extent of the tiling scheme but outside the extent of the coordinate system horizon will be clipped. This is the default.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Polygon features will be created for the full extent of the tiling scheme. Within each scale level, polygons will be of a uniform size and will not be clipped at the coordinate system horizon. This may create data that is outside the valid area of use for the geographic or projected coordinate system. If a scale within the tiling scheme would generate a tile that is larger than the spatial domain of the feature class, null geometry will be created for that feature.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否将面约束为地图的地理坐标系或投影坐标系的有效使用区域。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 将仅在地图地理坐标系或投影坐标系的有效使用区域内创建面要素。切片方案范围内但坐标系地平线范围之外的切片将被裁剪。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>未选中 - 将针对切片方案的全图范围创建面要素。在每个比例级别内，多边形的大小将统一，并且不会在坐标系地平线上进行裁剪。这可能会创建超出地理坐标系或投影坐标系有效使用区域的数据。如果切片方案中的比例生成的切片大于要素类的空间域，则将为该要素创建空几何。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        public MapServerCacheTilingSchemeToPolygons(object _input_map, object _tiling_scheme, object _output_feature_class, _use_map_extent_value _use_map_extent, _clip_to_horizon_value _clip_to_horizon)
        {
            this._input_map = _input_map;
            this._tiling_scheme = _tiling_scheme;
            this._output_feature_class = _output_feature_class;
            this._use_map_extent = _use_map_extent;
            this._clip_to_horizon = _clip_to_horizon;
        }
        public override string ToolboxName => "Cartography Tools";

        public override string ToolName => "Map Server Cache Tiling Scheme To Polygons";

        public override string CallName => "cartography.MapServerCacheTilingSchemeToPolygons";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_input_map, _tiling_scheme, _output_feature_class, _use_map_extent.GetGPValue(), _clip_to_horizon.GetGPValue(), _antialiasing.GetGPValue(), _levels];

        /// <summary>
        /// <para>Input Map</para>
        /// <para>The current map to be used.</para>
        /// <para>要使用的当前地图。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Map")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _input_map { get; set; }


        /// <summary>
        /// <para>Tiling Scheme</para>
        /// <para>A predefined tiling scheme .xml file.</para>
        /// <para>文件.xml预定义切片方案。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Tiling Scheme")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _tiling_scheme { get; set; }


        /// <summary>
        /// <para>Output Feature Class</para>
        /// <para>The output polygon feature class.</para>
        /// <para>输出面要素类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _output_feature_class { get; set; }


        /// <summary>
        /// <para>Generate polygons that intersect the map extent</para>
        /// <para><xdoc>
        ///   <para>Specifies whether polygon features will be created for the entire extent of the tiling scheme or only those tiles that intersect the full extent of the map.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—Polygon features will be created for the full extent of the map. This is the default.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Polygon features will be created for the full extent of the tiling scheme.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是为切片方案的整个范围创建面要素，还是仅为与地图全图范围相交的切片创建面要素。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 将针对地图的全图创建面要素。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>未选中 - 将针对切片方案的全图范围创建面要素。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Generate polygons that intersect the map extent")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _use_map_extent_value _use_map_extent { get; set; }

        public enum _use_map_extent_value
        {
            /// <summary>
            /// <para>USE_MAP_EXTENT</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("USE_MAP_EXTENT")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>FULL_TILING_SCHEME</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("FULL_TILING_SCHEME")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Clip tiles at the coordinate system horizon</para>
        /// <para><xdoc>
        ///   <para>Specifies whether polygons will be constrained to the valid area of use for the geographic or projected coordinate system of the map.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—Polygon features will only be created within the valid area of use for the geographic or projected coordinate system of the map. Tiles that are within the extent of the tiling scheme but outside the extent of the coordinate system horizon will be clipped. This is the default.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Polygon features will be created for the full extent of the tiling scheme. Within each scale level, polygons will be of a uniform size and will not be clipped at the coordinate system horizon. This may create data that is outside the valid area of use for the geographic or projected coordinate system. If a scale within the tiling scheme would generate a tile that is larger than the spatial domain of the feature class, null geometry will be created for that feature.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否将面约束为地图的地理坐标系或投影坐标系的有效使用区域。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 将仅在地图地理坐标系或投影坐标系的有效使用区域内创建面要素。切片方案范围内但坐标系地平线范围之外的切片将被裁剪。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>未选中 - 将针对切片方案的全图范围创建面要素。在每个比例级别内，多边形的大小将统一，并且不会在坐标系地平线上进行裁剪。这可能会创建超出地理坐标系或投影坐标系有效使用区域的数据。如果切片方案中的比例生成的切片大于要素类的空间域，则将为该要素创建空几何。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Clip tiles at the coordinate system horizon")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _clip_to_horizon_value _clip_to_horizon { get; set; }

        public enum _clip_to_horizon_value
        {
            /// <summary>
            /// <para>CLIP_TO_HORIZON</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("CLIP_TO_HORIZON")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>UNIFORM_TILE_SIZE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("UNIFORM_TILE_SIZE")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Generate polygons that match map service caches with anti-aliasing enabled</para>
        /// <para><xdoc>
        ///   <para>Specifies whether polygons that match map service caches with antialiasing enabled will be generated. A map service cache supertile is 2048 x 2048 pixels with antialiasing or 4096 x 4096 pixels without. To see if antialiasing was used in an existing cache, open the tiling scheme file, conf.xml, and see if the <Antialiasing> tag is set to true.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—Polygon tiles will be generated to match the supertile extent of a map service cache with antialiasing enabled.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Polygon tiles will be generated to match the supertile extent of a map service cache without antialiasing enabled. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定是否生成与启用了抗锯齿的地图服务缓存匹配的面。具有抗锯齿功能的地图服务缓存超切片为 2048 x 2048 像素，不具有抗锯齿功能的超切片为 4096 x 4096 像素。若要查看现有缓存中是否使用了抗锯齿，请打开切片方案文件 conf.xml，然后查看标记是否<Antialiasing>设置为 true。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 将生成面切片以匹配启用抗锯齿的地图服务缓存的超切片范围。</bullet_item><para/>
        ///     <bullet_item>未选中 - 在未启用抗锯齿的情况下，将生成面切片以匹配地图服务缓存的超切片范围。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Generate polygons that match map service caches with anti-aliasing enabled")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _antialiasing_value _antialiasing { get; set; } = _antialiasing_value._false;

        public enum _antialiasing_value
        {
            /// <summary>
            /// <para>ANTIALIASING</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("ANTIALIASING")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NONE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NONE")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Scales</para>
        /// <para>The scale levels at which polygons will be created. These scale levels automatically populate based on the scale levels in the input tiling scheme. You can create polygons for all or only some of the scale levels that are included in your tiling scheme. To add more scale levels, however, you must modify your tiling scheme file or create a new one, as the Add Value button is not available for this tool.</para>
        /// <para>将创建面的比例级别。这些比例级别会根据输入切片方案中的比例级别自动填充。您可以为切片方案中包含的所有或仅部分比例级别创建面。但是，要添加更多比例级别，必须修改切片方案文件或创建一个新切片方案文件，因为此工具的“添加值”按钮不可用。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Scales")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public List<object> _levels { get; set; } = null;


        public MapServerCacheTilingSchemeToPolygons SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}